package com.docker.ywx.service.impl;

import java.util.List;
import com.docker.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.docker.ywx.mapper.DoctorPrescriptionTemplateMapper;
import com.docker.ywx.domain.DoctorPrescriptionTemplate;
import com.docker.ywx.service.IDoctorPrescriptionTemplateService;

/**
 * 西/成处方模版Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-09
 */
@Service
public class DoctorPrescriptionTemplateServiceImpl implements IDoctorPrescriptionTemplateService 
{
    @Autowired
    private DoctorPrescriptionTemplateMapper doctorPrescriptionTemplateMapper;

    /**
     * 查询西/成处方模版
     * 
     * @param id 西/成处方模版主键
     * @return 西/成处方模版
     */
    @Override
    public DoctorPrescriptionTemplate selectDoctorPrescriptionTemplateById(Long id)
    {
        return doctorPrescriptionTemplateMapper.selectDoctorPrescriptionTemplateById(id);
    }

    /**
     * 查询西/成处方模版列表
     * 
     * @param doctorPrescriptionTemplate 西/成处方模版
     * @return 西/成处方模版
     */
    @Override
    public List<DoctorPrescriptionTemplate> selectDoctorPrescriptionTemplateList(DoctorPrescriptionTemplate doctorPrescriptionTemplate)
    {
        return doctorPrescriptionTemplateMapper.selectDoctorPrescriptionTemplateList(doctorPrescriptionTemplate);
    }

    /**
     * 新增西/成处方模版
     * 
     * @param doctorPrescriptionTemplate 西/成处方模版
     * @return 结果
     */
    @Override
    public int insertDoctorPrescriptionTemplate(DoctorPrescriptionTemplate doctorPrescriptionTemplate)
    {
        doctorPrescriptionTemplate.setCreateTime(DateUtils.getNowDate());
        return doctorPrescriptionTemplateMapper.insertDoctorPrescriptionTemplate(doctorPrescriptionTemplate);
    }

    /**
     * 修改西/成处方模版
     * 
     * @param doctorPrescriptionTemplate 西/成处方模版
     * @return 结果
     */
    @Override
    public int updateDoctorPrescriptionTemplate(DoctorPrescriptionTemplate doctorPrescriptionTemplate)
    {
        return doctorPrescriptionTemplateMapper.updateDoctorPrescriptionTemplate(doctorPrescriptionTemplate);
    }

    /**
     * 批量删除西/成处方模版
     * 
     * @param ids 需要删除的西/成处方模版主键
     * @return 结果
     */
    @Override
    public int deleteDoctorPrescriptionTemplateByIds(Long[] ids)
    {
        return doctorPrescriptionTemplateMapper.deleteDoctorPrescriptionTemplateByIds(ids);
    }

    /**
     * 删除西/成处方模版信息
     * 
     * @param id 西/成处方模版主键
     * @return 结果
     */
    @Override
    public int deleteDoctorPrescriptionTemplateById(Long id)
    {
        return doctorPrescriptionTemplateMapper.deleteDoctorPrescriptionTemplateById(id);
    }
}
